package com.andnnl.replace;

import cn.hutool.core.util.StrUtil;

/**
 * Created by chenss on 2021/9/6.
 */
public class ReplaceTest2 {
    public static void main(String[] args) {
        String s="";
        String[] ss = s.split("\n");

        String sql="insert into yh_template (tempName ,ctx ,uid ,eprId ,updateTime ) values ('YYY' ,'XXX' ,'szjjgateway_01', 261, getdate());";
        int start=980;
        for (String str : ss) {
            if(StrUtil.isBlank(str))continue;
            String sxx=sql.replaceAll("YYY","深圳交警-业务"+(++start));
            sxx=sxx.replaceAll("XXX",str);
            System.out.println(sxx);
        }
    }
}
